<?php
/*
Template Name: HomePage
*/
?>
<?php get_header(); ?>


<div id="contents">
<!-- Contents Starts -->

	<section class="left">
	<!-- Left Starts -->
    
    <?php
	query_posts( 'cat='.get_option('nm_fadi_homepage_cat') );
	?>
    <article class="each-post recent-posts">
    <!-- Each Post Article Starts -->
    	<div class="posts-container">
    		<h1>News</h1>
            
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

            
            <span>
            <!-- Each Post Heading Starts -->
	    		<h2><?php the_title()?></h2>
	    		<?php the_excerpt(); ?>
            <!-- Each Post Heading Ends -->    
    		</span>
            
            <?php endwhile; endif; ?>
            <?php wp_reset_query(); ?>
            
            
    	</div>
    <!-- Each Post Article Ends -->
    </article>
    
    
    
    <article class="each-post recent-posts">
    <!-- Each Post Article Starts -->
	    <div class="post-wrapper home-video">  
        <h1>My Video</h1>
        <iframe width="510" height="380" src="http://www.youtube.com/embed/gxEPV4kolz0" frameborder="0" allowfullscreen></iframe>
        </div>
    <!-- Each Post Article Ends -->
    </article>
    
    
    <?php
	/*Load gallery page*/
	query_posts( 'p=11' );
	?>
    <article class="each-post recent-posts">
    <!-- Each Post Article Starts -->
    	 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post-wrapper home-gallery">  
       	<h1><?php the_title()?></h1>
   		<?php the_content(); ?>
    	</div>
        
        <?php endwhile; endif; ?>
        <?php wp_reset_query(); ?>
    <!-- Each Post Article Ends -->
    </article>
    
    <article class="each-post recent-posts">
    <!-- Each Post Article Starts -->
    	<div class="posts-container">
    		<h1>Recents Posts</h1>
            
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

            
            <span>
            <!-- Each Post Heading Starts -->
	    		<h2><?php the_title()?></h2>
	    		<?php the_excerpt(); ?>
            <!-- Each Post Heading Ends -->    
    		</span>
            
            <?php endwhile; endif; ?>
            
            
    	</div>
    <!-- Each Post Article Ends -->
    </article>
    
    <!-- Left Ends -->
    </section>
    
	
	<?php get_sidebar()?>    
   
<!-- Contents Ends -->
</div>

<?php get_footer()?>
